<!DOCTYPE html>
<html><head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="author" content="Tencent-CDC">
    <meta name="Robots" content="all">
    <meta name="mobile-agent" content="format=html5;url=//pay.qq.com/h5/index.shtml">
    <link rel="canonical" href="//pay.qq.com/ipay/index.shtml">
    <meta name="Description" content="心币,充值中心,帐户充值,帐户管理,心币充值,心币查询">
    <meta name="Keywords" content="心币,充值中心,帐户充值,帐户管理,心币充值,心币查询">
    <meta content="Tencent" name="Copyright">
	
    <link rel="stylesheet" charset="utf-8" href="//imgcache.gtimg.cn/c/=/bossweb/ipay/css/pay/global.css,/bossweb/ipay/css/pay/ipay.css?max_age=31104000&amp;v=55bfbed7f362380648a5dfc299c14a5d" onreadystatechange="cssLoaded(this);">
    <script type="text/javascript" src="/js/jquery-1.11.3.min.js"></script>
    <title>服务开通 - 心教育充值中心</title>
</head>
<body>

<div id="wrapper" class="wrapper" style="">
	<div class="layout-content">
		<form id="form1" action="ktvip" method="post">
		<input type="hidden" name="uid" value="${p.uid!0}" />
		<input type="hidden" name=".table" value="vip" />
		<input type="hidden" name="user_id" value="${session.user.id!0}" />
		<div class="wrap-padding">
            <div id="pay_tips_or_actions"></div>
			<div id="pay_form" class="form-horizontal">
				<div id="pay_form_inner">
                    
					<div id="recharge_tips_mobile" class="form-title" style="display: block;">
                        <i class="icon_wake"></i>
                        <p>尊敬的用户，如需要给朋友充值请把账号改为朋友的用户名即可。</p>
                    </div>
					<div class="anchor">
         				<div class="newApp" id="wxpay" style="display:none;"></div>
     				</div>
                    <div id="service_selector_field" class="control-group" style="">
                        <label id="service_field_label" class="control-label">开通服务：</label>
                        <div id="service_select_list" class="controls">
                        <label data-val="vip" class="type selected">
                        <a id="ltmclub_service_radio" class="radio-box" href="javascript:void(0);">VIP会员<i class="icon-check"></i></a>
                        </label>
                        <label data-val="svip" class="type">
                        <a id="cjclub_service_radio" class="radio-box" href="javascript:void(0);">超级会员<i class="icon-check"></i></a>
                        </label>
                        </div>
                    </div>
                    <div id="target_uin_input_field" class="control-group">
                        <label id="target_uin_field_label" class="control-label">开通账号：</label>
                        <div class="controls">
                            <span id="target_uin_value" class="title-primary" style="display: none;"></span>
                            <div id="target_uin_wrapper" class="input-append user-append open">
                                <input name="username" id="username" value="${session.user.username!}" placeholder="用戶名" class="input-user" type="text" maxlength="20">
                                	(用戶名)
                                <div class="dropdown">
                                    <div id="friend_list_outer" class="bind_friend">
                                        <div class="f_qqlist" id="f_list" style="display: none;">
                                        <div class="f_list">
                                        <ul style="float: none;" id="group_self"><li qq="57094201" name="自己" title="自己(57094201)"><a href="javascript:void(0);" onclick="FRIEND_LIST.friend(this.parentNode);">自己(57094201)</a></li></ul>
                                        </div>
                                        </div>
                                        <div class="f_qqlist" id="f_search" style="display: none;"></div>
                                    </div>
                                </div>
                                
                            </div>
                            <div id="user_err" class="help-normal" style="display: block;"></div>
                            <div id="target_uin_warning" class="help-block"></div>
                        </div>
                    </div>
                    
                    <div id="pay_channel_field" class="control-group">
                        <span id="channel_field_label" class="control-label">开通方式：</span>
                        <div class="controls">
                            <div id="channel_select_list" class="controls-option" style="display: block;">
                            
                            <label data-val="wx" class="paytype selected"><a class="radio-box" href="javascript:void(0);">微信支付<i class="icon-check"></i></a></label>
                            <label data-val="alipay" class="paytype "><a class="radio-box" href="javascript:void(0);">支付宝<i class="icon-check"></i></a></label>
                            <label data-val="cb" class="paytype " style="display: none;"><a class="radio-box" href="javascript:void(0);">心币支付<i class="icon-check"></i></a></label>
                             <div id="channel_tips" class="help-normal" style="opacity: 1;display: none;"><a href="javascript:void(0);" onclick="QDQB.get_balance('gray');return false;">查询余额</a></div>
                        	</div>
                        </div>
                    </div>
                    <div id="main_template" style="opacity: 1;">
					<div class="control-group "><label class="control-label">应付金额：</label><div class="controls"><h5 class="title-primary"><em id="pay_fee">365</em>元<span class="help-inline">(1元=1心币&nbsp;&nbsp;1心币=100积分)</span></h5></div></div>
					<div class="controls"><div class="controls-info">
					
					<a  href="javascript:void(0);" class="checkbox"><input id="checkbox" class="icon-checkbox" type="checkbox" value="1" >我已同意会员协议 </a>
					</div></div><div class="form-actions">    
					<button id="sub" disabled type="submit" class="btn-primary disabled"><span>立即开通</span></button>
				</div>
			</div>
		</div>
		</form>
		<div id="warm_tips_wrapper" class="geniality-tip" style="display:none;">
			<p class="g-title"><i class="icon-warn-g"></i>温馨提示</p>
			<div id="warm_tips_content" class="g-cont"></div>
		</div>
	</div>
</div>

<script type="text/javascript">
	var type="vip"
	var paytype="wx"
	var price=365;
	$(function(){
		$(".type").click(function(){
			$(".type").removeClass("selected");
			$(this).addClass("selected")
			type=$(this).attr("data-val");
			if(type=="vip"){
				$("#pay_fee").text(365)
				price=365;
			}else{
				$("#pay_fee").text(9800)
				price=9800;
			}
		})
		$(".paytype").click(function(){
			$(".paytype").removeClass("selected");
			$(this).addClass("selected")
			paytype=$(this).attr("data-val");
		})
		$("#checkbox").click(function(){
			if($(this).is(':checked')){
				$("#sub").removeClass("disabled");
				$("#sub").removeAttr("disabled")
			}else{
				$("#sub").addClass("disabled");
				$("#sub").attr("disabled","disabled")
			}
			
		})
		$("#form1").submit(function(e){ 
			var form1=$(this);
			var _type = $('<input type="hidden" name="type" value="'+type+'" />');  
		  	form1.append(_type);
		  	var _paytype = $('<input type="hidden" name="paytype" value="'+paytype+'" />');  
		  	form1.append(_paytype);
		  	var _price = $('<input type="hidden" name="price" value="'+price+'" />');  
		  	form1.append(_price);
		  	var res=true;
		  	$.ajax({
		  	    url:'/raw/vip/isusername',
		  	    type:'POST', //GET
		  	    async:false,    //或false,是否异步
		  	    data:{
		  	        username:$("#username").val()
		  	    },
		  	    timeout:10000,    //超时时间
		  	    dataType:'text',    //返回的数据格式：json/xml/html/script/jsonp/text
		  	    success:function(data,textStatus,jqXHR){
		  	    	 if(data=="1"){
		  	        	$("#user_err").text("用户正确")
		  	        }else{
		  	        	$("#user_err").text("用户账号未注册")
			  	        res=false;
		  	        }
		  	    },error:function(xhr,textStatus){
		  	    	$("#user_err").text("用户账号未注册")
		  	        res=false;
		  	    }
		  	})
		  	if(paytype=="alipay"){
		  		form1.attr("target","_parent")
		  	}
    		return res;
		});
	})
</script>
</body></html>